package com.power.sifa.info.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;
import com.power.sifa.info.model.Law_pubunit;

import javax.transaction.Transactional;
import java.io.Serializable;
import java.util.List;

/**
 * 法律发布机关 持久层(hibernate)
 */

public interface Law_pubunitDao extends JpaRepository<Law_pubunit, Serializable>, JpaSpecificationExecutor<Law_pubunit>, Repository<Law_pubunit, Serializable>, Law_pubunitDaoCustom<Law_pubunit, Serializable> {

   @Modifying
   @Transactional
   @Query("delete  from Law_pubunit s where  s.id in (:ids) ")
   void removeByIds(@Param("ids") List<Integer> ids);
}
